from rest_framework import serializers

from rest_framework.validators import UniqueValidator
from rest_framework.validators import UniqueTogetherValidator

from competition.serializers import CompetitionListSerializer
from group.models import Group
from school.serializers import SchoolListSerializer

class GroupListSerializer(serializers.ModelSerializer):
    """
    分组详情序列化类
    """
    school = SchoolListSerializer()
    competition_season = CompetitionListSerializer()
    class Meta:
        model = Group
        exclude = ['create_time']



class GroupCreateSerializer(serializers.ModelSerializer):
    """
    分组新建序列化类
    """
    class Meta:
        model = Group
        fields = "__all__"
